package com.situ.mall.user.controller;


import com.situ.mall.common.util.Result;
import com.situ.mall.pojo.entity.user.User;
import com.situ.mall.user.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Sun Huijuan
 * @since 2024-10-14
 */
@RestController
@RequestMapping("/user")
public class UserController {

	@Autowired
	private IUserService userService;
	
	@RequestMapping("/login")
	public Result<User> login(@RequestBody User user) {
		User loginUser=userService.login(user);
		return Result.ok(loginUser);
	}
}

